#include <bits/stdc++.h>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
using ll = long long;
void solve()
{
    string s;
    cin >> s;
    s=" "+s;
    ll l=1,r=s.size()-1;
    ll ans = 0;
    while(l<r)
    {
        if(s[l]==s[r])
        {
            l++,r--;
        }
        else {
            ans++;
            l++, r--;
        }
    }
    cout << ans;
}
int main()
{
    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
   return 0;
}
